from faker import Faker

fake = Faker('zh_CN')

#存储生成数据
# user_data = []

with open("user_data.txt", "w", encoding="utf-8") as f:
    for i in range(500):
        name = fake.name()
        # password = fake.password()
        password = fake.random_int(min=100000, max=999999)
        # IDcard = fake.ssn()
        # phone = fake.phone_number()
        # email = fake.email()
        # paypwd = fake.random_int(min=100000, max=999999)

        # data_line = f"{name};{password};{IDcard};{phone};{email};{paypwd}\n"
        data_line = f"username={name}&password={password};100\n"

        f.writelines(data_line)